﻿using System.Linq;
using System.Collections.Generic;
using PhoneCore.Framework;
using PhoneCore.Framework.Configuration;
using PhoneCore.Framework.IoC;
using Property = SecureBox.UI.Infrastructure.Model.Property;

namespace SecureBox.UI.ViewModel
{
    public class NoteViewPageModel: TemplateViewPage
    {
        public NoteViewPageModel() 
        {

        }

        #region  Binding properties

        public string Note { get; set; }

        #endregion


        protected override IEnumerable<Property> GetProperties()
        {
            return new[]
            {
                 new Property() {Name = "Note", Value = Note},
            };
        }

        protected override string GetTemplateName()
        {
            return "Note";
        }

        protected override bool IsValid()
        {
            return base.IsValid();
        }

        protected override void FillProperties()
        {
            Name = EditRecord.Name;
            Keyword = GetKeywordsField();
            Note = GetPropertyValueByName("Note");
        }

        protected override void EraseProperties()
        {
            Name = string.Empty;
            Keyword = string.Empty;
            Note = string.Empty;
        }
    }
}
